#ifndef CodeFind_H
#define CodeFind_H

#include <QString>
#include "figure.h"

namespace CxQML {
    class Point;
    class LineSegment;

    class CodeFind: public Figure
    {
    public:
        CodeFind();
        CodeFind(const Point& point1, const Point& point2, const Point& point3, const Point& point4);
        CodeFind(const Point& point1, const Point& point2);
        CodeFind(const Point& point, double width, double height);
        virtual ~CodeFind();

        operator QString();

       int necessaryPointsQuant() const;

        bool isClosed() const;

        bool isValid() const;

        double width() const;
        double height() const;

        bool checkDiagonslsEquality() const;

        Point topLeftPoint() const;
        Point topRightPoint() const;
        Point bottomLeftPoint() const;
        Point bottomRightPoint() const;

        LineSegment topSide() const;
        LineSegment rightSide() const;
        LineSegment bottomSide() const;
        LineSegment leftSide() const;

        QString className() const;

    };

}

#endif // CodeFind_H
